<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2006-2016 the original author or authors.

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.

-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Running MyBatis Generator with Eclipse</title>
  <link rel="stylesheet" type="text/css" href="../mbgstyle.css" />
</head>
<body>
<h1>Running MyBatis Generator with Eclipse</h1>
<h2>Installing the Eclipse Feature</h2>
<p>The eclipse feature can be installed in any of the following ways:</p>
<ul>
  <li>Search for "MyBatis Generator" in the Eclipse marketplace and install directly from
    the marketplace.  You can access the eclipse marketplace in two ways:
    <ol>
      <li>Take the menu option Help&gt;Eclipse Marketplace... in a running eclipse instance</li>
      <li>Go to <a href="https://marketplace.eclipse.org/">https://marketplace.eclipse.org/</a></li>
    </ol>
  </li>
  <li>Manually configure an update site that points to
  <a href="https://dl.bintray.com/mybatis/mybatis-generator">https://dl.bintray.com/mybatis/mybatis-generator</a></li>
  <li>Download the zipped eclipse update site from the GitHub release page
    (https://github.com/mybatis/generator/releases), unzip, and configure
    an update site that points to your unzipped directory.</li>
</ul>
<h2>Using the Eclipse Feature</h2>
<p>To get up and running quickly with MyBatis Generator in the eclipse environment, follow these steps:</p>
<ol>
  <li>Create a configuration file:
    <ol type="a">
      <li>File&gt;New&gt;Other...</li>
      <li>Select "MyBatis Generator Configuration File" from the "MyBatis"
          category, then press "Next"</li>
      <li>Specify the location of the file, and the name of the file (defaults to generatorConfig.xml)</li>
      <li>Finish the wizard</li>
    </ol>
  </li>
  <li>Fill out the configuration file appropriately.  At a minimum, you must specify:
    <ol type="a">
      <li>jdbcConnection information to specify how to connect to the target database</li>
      <li>A target package, and target project for the javaModelGenerator</li>
      <li>A target package, and target project for the sqlMapGenerator</li>
      <li>A target package, target project, and type for the javaClientGenerator (or you can remove the
          javaClientGenerator element if you don't wish to generate Java Clients)</li>
      <li>At least one database table</li>
    </ol>
  </li>
  <li>Save the file</li>
  <li>Right click on the configuration file in Eclipse's navigator, or package explorer, view and take the
      menu option "Run As&gt;Run MyBatis Generator"</li>
</ol>
<p><b>Important Note:</b>
  MyBatis Generator in eclipse will not overwrite any custom changes you make to the objects it generates.  You can
  run it over and over again without fear of losing custom changes.</p>
</body>
</html>